#!/usr/bin/perl 
# changeglobal.pl
use warnings;
use strict;

our $global = 'before';

sub changeglobal {
   local *local = *global;
   our $local = 'after';
}

print "$global \n";
changeglobal;
print "$global \n";